import { create } from "zustand";
interface CountType {
  count: number;
  increment: (arg: number) => void;
}
export const useCounter = create<CountType>((set) => ({
  count: 0,
  increment(n) {
    console.log("++");
    set((state) => ({
      count: (state.count += n),
    }));
  },
}));
